jQuery(".alert").click(function () { alert("준비중입니다."); }); jQuery("a[href='/board/board.html?code=desart1_board6']").attr("href", "/board/board.html?code=desart1_image11"); /** * Cookie plugin * * Copyright (c) 2006 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ /** * Create a cookie with the given name and value and other optional parameters. * * @example $.cookie('the_cookie', 'the_value'); * @desc Set the value of a cookie. * @example $.cookie('the_cookie', 'the_value', {expires: 7, path: '/', domain: 'jquery.com', secure: true}); * @desc Create a cookie with all available options. * @example $.cookie('the_cookie', 'the_value'); * @desc Create a session cookie. * @example $.cookie('the_cookie', null); * @desc Delete a cookie by passing null as value. * * @param String name The name of the cookie. * @param String value The value of the cookie. * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. * If set to null or omitted, the cookie will be a session cookie and will not be retained * when the the browser exits. * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will * require a secure protocol (like HTTPS). * @type undefined * * @name $.cookie * @cat Plugins/Cookie * @author Klaus Hartl/klaus.hartl@stilbuero.de */ /** * Get the value of a cookie with the given name. * * @example $.cookie('the_cookie'); * @desc Get the value of a cookie. * * @param String name The name of the cookie. * @return The value of the cookie. * @type String * * @name $.cookie * @cat Plugins/Cookie * @author Klaus Hartl/klaus.hartl@stilbuero.de */ jQuery.cookie = function(name, value, options) { if (typeof value != 'undefined') { // name and value given, set cookie options = options || {}; if (value === null) { value = ''; options.expires = -1; //options.path = "/"; } var expires = ''; if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { var date; if (typeof options.expires == 'number') { date = new Date(); date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); } else { date = options.expires; } expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE } var path = options.path ? '; path=' + options.path : ''; var domain = options.domain ? '; domain=' + options.domain : ''; var secure = options.secure ? '; secure' : ''; document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); } else { // only name given, get cookie var cookieValue = null; if (document.cookie && document.cookie != '') { var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { var cookie = jQuery.trim(cookies[i]); // Does this cookie string begin with the name we want? if (cookie.substring(0, name.length + 1) == (name + '=')) { cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); break; } } } return cookieValue; } }; /********************************************************************************* 플러그인 : jquery.d_quickFloating.js 제작자 : 디자인블랙 , http://designblack.com 업데이트 : 2016-02-05 라이센스 : 이경호 무한라이센스 *********************************************************************************/ !function(o){o.fn.d_quickFloating=function(e){var i={dir:"right",openState:1,closeGap:0,motionSpeed:500,cookieDay:1};return o.extend(i,e),this.each(function(){function e(){t(),a()}function t(){null==o.cookie(h)&&1==i.openState&&o.cookie(h,"show",{path:"/",expires:i.cookieDay}),"show"==o.cookie(h)?(s=1,c.addClass("d_on")):(s=0,"left"==p?n.css("left",-d+i.closeGap):n.css("right",-d+i.closeGap)),n.show()}function a(){c.bind("click",function(){"left"==p?1==s?(n.stop().animate({left:-d+i.closeGap},i.motionSpeed),o(this).removeClass("d_on"),o.cookie(h,"hide",{path:"/",expires:i.cookieDay})):(n.stop().animate({left:0},i.motionSpeed),o(this).addClass("d_on"),o.cookie(h,"show",{path:"/",expires:i.cookieDay})):1==s?(n.stop().animate({right:-d+i.closeGap},i.motionSpeed),o(this).removeClass("d_on"),o.cookie(h,"hide",{path:"/",expires:i.cookieDay})):(n.stop().animate({right:0},i.motionSpeed),o(this).addClass("d_on"),o.cookie(h,"show",{path:"/",expires:i.cookieDay})),s=!s})}var s,n=o(this),c=n.find(".d_toggle"),d=n.width(),p=i.dir,h="d_quickFloating_"+p;n.hide(),e()})}}(jQuery); //플로그인파일(위)에 함수(아래)를 같이 셋팅하시면 됩니다... 함수실행은 모든 돔이 호출된 뒤에 함수가 실행되어야 하기때문에 ready 함수 안에 들어가야 합니다 ... $(document).ready(function(){ $('.d_etc18_right').d_quickFloating({ dir:"right", openState:1, //오픈상태(1/0) closeGap:0, //닫힐때 우측여백 motionSpeed:500, //속도(0~) cookieDay:1 //쿠키유지(일) }); }); /*! * liScroll 1.0 * Examples and documentation at: * http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/jq-liscroll/scrollanimate.html * 2007-2010 Gian Carlo Mingati * Version: 1.0.2.1 (22-APRIL-2011) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * Requires: * jQuery v1.2.x or later * */ jQuery.fn.liScroll = function(settings) { settings = jQuery.extend({ travelocity: 0.07 }, settings); return this.each(function(){ var $strip = jQuery(this); $strip.addClass("newsticker") var stripWidth = 1; $strip.find("li").each(function(i){ stripWidth += jQuery(this, i).outerWidth(true); // thanks to Michael Haszprunar and Fabien Volpi }); var $mask = $strip.wrap("
"); var $tickercontainer = $strip.parent().wrap(""); var containerWidth = $strip.parent().parent().width(); //a.k.a. 'mask' width $strip.width(stripWidth); var totalTravel = stripWidth+containerWidth; var defTiming = totalTravel/settings.travelocity; // thanks to Scott Waye function scrollnews(spazio, tempo){ $strip.animate({left: '-='+ spazio}, tempo, "linear", function(){$strip.css("left", containerWidth); scrollnews(totalTravel, defTiming);}); } scrollnews(totalTravel, defTiming); $strip.hover(function(){ jQuery(this).stop(); }, function(){ var offset = jQuery(this).offset(); var residualSpace = offset.left + stripWidth; var residualTime = residualSpace/settings.travelocity; scrollnews(residualSpace, residualTime); }); }); }; $(document).ready(function(){ if( $(window).width() > 1024){ $(".boardTicker").liScroll(); } }); $(window).load(function() { var snbFixed = $('.d_etc18_rightWrap'); var snbTop = snbFixed.offset().top; $(window).scroll(function () { var winTop = $(this).scrollTop(); if (winTop > 0) { $(".d_etc18_right").css({"top":"118px"}); } else if (winTop == 0) { $(".d_etc18_right").css({"top":"118px"}); } }); });